<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>欢迎登录新疆亿事通客户端</title>
<link href="style/style.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="${ctx}/scripts/jquery.js"></script>
<script src="${ctx}/scripts/cloud.js" type="text/javascript"></script>

<script language="javascript">
	window.onload = function(){
	    $('#loginbox').css({'position':'absolute','left':($(window).width()-692)/2});
		$(window).resize(function(){  
	   		 $('.loginbox').css({'position':'absolute','left':($(window).width()-692)/2});
	    })
	    var url = window.location.href.split("?");
	    if(url.length > 1){
	    	$("#msg").html(decodeURI(url[1]));
	    }  
	};  
	function chk(){
		if($("#username").val() == ''){
			$("#msg").html("登录名不能为空！");
			return false;
		}else if($("#password").val() == ''){
			$("#msg").html("登录密码不能为空！");
			return false;
		}
		return true;
	}
	function setLanguage(val){
		$.post("Login_setLanguage.action?code="+val);
	}
</script> 
<style type="text/css">
	.main{
		background-color:#1c77ac;
		background-image:url(images/light.png);
		background-repeat:no-repeat; 
		background-position:center top; 
		overflow:hidden;
	}
</style>
</head>

<body class="main">
    <div id="mainBody">
      <div id="cloud1" class="cloud"></div>
      <div id="cloud2" class="cloud"></div>
    </div>  
	<div class="logintop">    
    	<span>欢迎使用新疆亿事通</span>    
    	<ul>
		    <li style="padding-top:13px;">
		    	<a>语言选择：</a>
		    	<s:select list="#{0:'中文',1:'维文'}"   cssStyle="width:80px;"
					listKey="key" listValue="value" onclick="setLanguage(this.value)" />
		    </li>
		    <li><a href="Agentaccountinfo_toAdd.action">代理商注册</a></li>
	    </ul>    
    </div>
    <div class="loginbody">
    <span class="systemlogo"></span> 
    <div class="loginbox" id="loginbox">
    	<form id="user_logon" method="post" action="Login_userLogin.action" onSubmit="return chk(this);">
		    <ul>
			    <li><input name="user.username" id="username" type="text" class="loginuser"/></li>
			    <li><input name="user.password" id="password" type="password" class="loginpwd" /></li>
			    <li><input type="submit" class="loginbtn" value="登录"  /><span style="color: red" id="msg"></span></li> 
		    </ul>
	  	</form>
    </div>
    </div>
    <div class="loginbm">版权所有  2013  新疆亿事通</div>
</body>
</html>
